package com.etoak.utils;

import com.etoak.status.StatusCode;

/**
 * @Author by 孙有泽
 * @Date 2025/2/15 11:09
 * @Description
 */
public class ResultUtils {
    public static ResultVo success(){
        return Vo(StatusCode.SUCCESS, null,null);

    }
    public static ResultVo success(String msg){
        return  Vo(StatusCode.SUCCESS,msg ,null);
    }
    public static ResultVo success(String msg,Object data) {
        return Vo(StatusCode.SUCCESS,msg ,data);
    }
    public static ResultVo success(Integer code,String msg,Object data) {
        return Vo(code,msg ,data);
    }
    public static ResultVo Vo(Integer code,String msg,Object data) {
        return new ResultVo(code,msg ,data);
    }
    public static ResultVo error(){
        return  Vo(StatusCode.ERROR, null,null);
    }
    public static ResultVo error(String msg){
        return  Vo(StatusCode.ERROR,msg ,null);
    }
    public static ResultVo error(String msg,Object data) {
        return  Vo(StatusCode.ERROR,msg ,data);
    }
    public static ResultVo error(String msg,Integer code,Object data) {
        return new ResultVo(code,msg ,data);
    }
}
